Chat Support
Loupe - Log - Monitor - Resolve
Gibraltar.Monitor Namespace / Log Class / Write Method / Write(LogMessageSeverity,LogWriteMode,Exception,String,String,String,Object[]) Method
The log message severity.
Whether to queue-and-return or wait-for-commit.
An Exception object to attach to this log message.
The category for this log message.
A simple single-line message caption. (Will not be processed for formatting.)
Additional multi-line descriptive message (or may be null) which can be a format string followed by corresponding args.
A variable number of arguments referenced by the formatted description string (or no arguments to skip formatting).

In This Topic
    Write(LogMessageSeverity,LogWriteMode,Exception,String,String,String,Object[]) Method
    In This Topic
    Write a log message directly to the Gibraltar log with an attached Exception and specifying Queued or WaitForCommit behavior.
    Syntax
    'Declaration
     
    
    Public Overloads Shared Sub Write( _
       ByVal severity As LogMessageSeverity, _
       ByVal writeMode As LogWriteMode, _
       ByVal exception As Exception, _
       ByVal category As String, _
       ByVal caption As String, _
       ByVal description As String, _
       ByVal ParamArray args() As Object _
    ) 

    Parameters

    severity
    The log message severity.
    writeMode
    Whether to queue-and-return or wait-for-commit.
    exception
    An Exception object to attach to this log message.
    category
    The category for this log message.
    caption
    A simple single-line message caption. (Will not be processed for formatting.)
    description
    Additional multi-line descriptive message (or may be null) which can be a format string followed by corresponding args.
    args
    A variable number of arguments referenced by the formatted description string (or no arguments to skip formatting).
    Remarks

    The log message will be attributed to the caller of this method. Wrapper methods should instead call the WriteMessage() method in order to attribute the log message to their own outer callers.

    This overload also allows an Exception object to be attached to the log message. An Exception-typed null (e.g. from a variable of an Exception type) is allowed for the exception argument, but calls which do not have a possible Exception to attach should use an overload without an exception argument rather than pass a direct value of null, to avoid compiler ambiguity over the type of a simple null.

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also